package com.glls.customer.service.impl;


import com.glls.common.entity.Goods;
import com.glls.customer.feign.SearchFeignClient;
import com.glls.customer.service.CustomerService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * TODO
 *
 * @author junyang
 * @version 1.0.0
 * @date 2025/2/20 9:33
 */
@Service
public class CustomerServiceImpl implements CustomerService {
    @Resource
    private SearchFeignClient searchFeignClient;
    @Override
    public Goods findGoodsByIdWithFeign(Integer id) {
        Goods goods = searchFeignClient.search(id);
        return goods;
    }

    @Override
    public Goods searchGoodsByIdWithFeign(Integer id, String name) {
        return searchFeignClient.search(id,name);
    }

    @Override
    public Goods findJifenByIdWithFeign(Integer id) {
        return searchFeignClient.findJifenById(id);
    }

    @Override
    public Map save(Goods goods) {
        return searchFeignClient.saveGoods(goods);
    }

    @Override
    public Map update(Goods goods) {
        return searchFeignClient.update(goods);
    }

    @Override
    public Map deleteById(Integer id) {
        return searchFeignClient.deleteById(id);
    }


}
